


<!doctype html>
<html lang="zh" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
      
      
      <link rel="shortcut icon" href="../../images/logo.ico">
      <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-5.5.3">
    
    
      
        <title>模块架构 - spipy 使用教程</title>
      
    
    
      <link rel="stylesheet" href="../../assets/stylesheets/main.947af8d5.min.css">
      
        <link rel="stylesheet" href="../../assets/stylesheets/palette.7f672a1f.min.css">
      
      
        
        
        <meta name="theme-color" content="#009688">
      
    
    
    
      
        <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7C&display=fallback">
        <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"",SFMono-Regular,Consolas,Menlo,monospace}</style>
      
    
    
    
    
      
    
    
  </head>
  
  
    
    
    
    <body dir="ltr" data-md-color-scheme="" data-md-color-primary="teal" data-md-color-accent="teal">
  
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#analyse" class="md-skip">
          跳转至
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
      <header class="md-header" data-md-component="header">
  <nav class="md-header-nav md-grid" aria-label="Header">
    <a href="../.." title="spipy 使用教程" class="md-header-nav__button md-logo" aria-label="spipy 使用教程">
      
  <img src="../../images/logo.png" alt="logo">

    </a>
    <label class="md-header-nav__button md-icon" for="__drawer">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
    </label>
    <div class="md-header-nav__title" data-md-component="header-title">
      
        <div class="md-header-nav__ellipsis">
          <span class="md-header-nav__topic md-ellipsis">
            spipy 使用教程
          </span>
          <span class="md-header-nav__topic md-ellipsis">
            
              模块架构
            
          </span>
        </div>
      
    </div>
    
      <label class="md-header-nav__button md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
      </label>
      
<div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" aria-label="搜索" placeholder="搜索" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
      <label class="md-search__icon md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
      </label>
      <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
      </button>
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="search-result">
          <div class="md-search-result__meta">
            Initializing search
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
    
    
  </nav>
</header>
    
    <div class="md-container" data-md-component="container">
      
        
      
      
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href="../.." title="spipy 使用教程" class="md-nav__button md-logo" aria-label="spipy 使用教程">
      
  <img src="../../images/logo.png" alt="logo">

    </a>
    spipy 使用教程
  </label>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      


  <li class="md-nav__item">
    <a href="../.." title="简介" class="md-nav__link">
      简介
    </a>
  </li>

    
      
      
      

  


  <li class="md-nav__item md-nav__item--active md-nav__item--nested">
    
      <input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" checked>
    
    <label class="md-nav__link" for="nav-2">
      快速上手
      <span class="md-nav__icon md-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>
      </span>
    </label>
    <nav class="md-nav" aria-label="快速上手" data-md-level="1">
      <label class="md-nav__title" for="nav-2">
        <span class="md-nav__icon md-icon">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
        </span>
        快速上手
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../installation/" title="安装" class="md-nav__link">
      安装
    </a>
  </li>

        
          
          
          

  


  <li class="md-nav__item md-nav__item--active">
    
    <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
    
    
      <label class="md-nav__link md-nav__link--active" for="__toc">
        模块架构
        <span class="md-nav__icon md-icon">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>
        </span>
      </label>
    
    <a href="./" title="模块架构" class="md-nav__link md-nav__link--active">
      模块架构
    </a>
    
      
<nav class="md-nav md-nav--secondary" aria-label="目录">
  
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
      </span>
      目录
    </label>
    <ul class="md-nav__list" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#analyse" class="md-nav__link">
    analyse
  </a>
  
    <nav class="md-nav" aria-label="analyse">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#q" class="md-nav__link">
    q
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#saxs" class="md-nav__link">
    saxs
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#orientation" class="md-nav__link">
    orientation
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#criterion" class="md-nav__link">
    criterion
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#rotate" class="md-nav__link">
    rotate
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#sh_expan" class="md-nav__link">
    SH_expan
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#image" class="md-nav__link">
    image
  </a>
  
    <nav class="md-nav" aria-label="image">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#radp" class="md-nav__link">
    radp
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#quat" class="md-nav__link">
    quat
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#classify" class="md-nav__link">
    classify
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#preprocess" class="md-nav__link">
    preprocess
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#io" class="md-nav__link">
    io
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#merge" class="md-nav__link">
    merge
  </a>
  
    <nav class="md-nav" aria-label="merge">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#emc" class="md-nav__link">
    emc
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#tools" class="md-nav__link">
    tools
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#phase" class="md-nav__link">
    phase
  </a>
  
    <nav class="md-nav" aria-label="phase">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#phmodel" class="md-nav__link">
    phmodel
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#phexec" class="md-nav__link">
    phexec
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#phase2d" class="md-nav__link">
    phase2d （停止维护）
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#phase3d" class="md-nav__link">
    phase3d （停止维护）
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#simulate" class="md-nav__link">
    simulate
  </a>
  
    <nav class="md-nav" aria-label="simulate">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#sim_adu" class="md-nav__link">
    sim_adu
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
    
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../best-practice/" title="使用例子" class="md-nav__link">
      使用例子
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
    
    <label class="md-nav__link" for="nav-3">
      命令行工具
      <span class="md-nav__icon md-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>
      </span>
    </label>
    <nav class="md-nav" aria-label="命令行工具" data-md-level="1">
      <label class="md-nav__title" for="nav-3">
        <span class="md-nav__icon md-icon">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
        </span>
        命令行工具
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../Scripts/Introduction/" title="简介" class="md-nav__link">
      简介
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../Scripts/Integrated-UI/" title="集成可视化工具" class="md-nav__link">
      集成可视化工具
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
    
    <label class="md-nav__link" for="nav-4">
      API文档
      <span class="md-nav__icon md-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>
      </span>
    </label>
    <nav class="md-nav" aria-label="API文档" data-md-level="1">
      <label class="md-nav__title" for="nav-4">
        <span class="md-nav__icon md-icon">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
        </span>
        API文档
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../Documents/analyse/" title="analyse模块" class="md-nav__link">
      analyse模块
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../Documents/image/" title="image模块" class="md-nav__link">
      image模块
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../Documents/merge/" title="merge模块" class="md-nav__link">
      merge模块
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../Documents/phase/" title="phase模块" class="md-nav__link">
      phase模块
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../Documents/simulate/" title="simulate模块" class="md-nav__link">
      simulate模块
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-nav__toggle md-toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
    
    <label class="md-nav__link" for="nav-5">
      图形界面
      <span class="md-nav__icon md-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>
      </span>
    </label>
    <nav class="md-nav" aria-label="图形界面" data-md-level="1">
      <label class="md-nav__title" for="nav-5">
        <span class="md-nav__icon md-icon">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
        </span>
        图形界面
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../Graphics-UI/installation/" title="安装" class="md-nav__link">
      安装
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../Graphics-UI/preview/" title="预览" class="md-nav__link">
      预览
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    
<nav class="md-nav md-nav--secondary" aria-label="目录">
  
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
      </span>
      目录
    </label>
    <ul class="md-nav__list" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#analyse" class="md-nav__link">
    analyse
  </a>
  
    <nav class="md-nav" aria-label="analyse">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#q" class="md-nav__link">
    q
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#saxs" class="md-nav__link">
    saxs
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#orientation" class="md-nav__link">
    orientation
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#criterion" class="md-nav__link">
    criterion
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#rotate" class="md-nav__link">
    rotate
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#sh_expan" class="md-nav__link">
    SH_expan
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#image" class="md-nav__link">
    image
  </a>
  
    <nav class="md-nav" aria-label="image">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#radp" class="md-nav__link">
    radp
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#quat" class="md-nav__link">
    quat
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#classify" class="md-nav__link">
    classify
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#preprocess" class="md-nav__link">
    preprocess
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#io" class="md-nav__link">
    io
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#merge" class="md-nav__link">
    merge
  </a>
  
    <nav class="md-nav" aria-label="merge">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#emc" class="md-nav__link">
    emc
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#tools" class="md-nav__link">
    tools
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#phase" class="md-nav__link">
    phase
  </a>
  
    <nav class="md-nav" aria-label="phase">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#phmodel" class="md-nav__link">
    phmodel
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#phexec" class="md-nav__link">
    phexec
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#phase2d" class="md-nav__link">
    phase2d （停止维护）
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#phase3d" class="md-nav__link">
    phase3d （停止维护）
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#simulate" class="md-nav__link">
    simulate
  </a>
  
    <nav class="md-nav" aria-label="simulate">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#sim_adu" class="md-nav__link">
    sim_adu
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          <div class="md-content">
            <article class="md-content__inner md-typeset">
              
                
                
                  
                
                
                  <h1>模块架构</h1>
                
                <p>spipy库总共包含五个底层模块，以及在此基础上构建的命令行工具和图形界面。底层模块结构如下所示：</p>
<hr />
<h3 id="analyse"><a href="../../Documents/analyse/">analyse</a></h3>
<blockquote>
<p>散射实验数据分析模块</p>
</blockquote>
<h4 id="q">q</h4>
<ul>
<li><code>cal_q</code> : 计算倒易空间的散射向量q值</li>
<li><code>cal_q_pat</code> : 计算散射图每像素的q值</li>
<li><code>cal_r</code> : 根据一列q值计算对应的探测器上的径向位置</li>
<li><code>oversamp_rate</code> : 计算过采样率</li>
<li><code>ewald_mapping</code> : 将探测器像素映射至Ewald球上</li>
</ul>
<h4 id="saxs">saxs</h4>
<ul>
<li><code>grid</code> : 计算散射图的网格</li>
<li><code>friedel_search</code> : 计算散射图的中心（q=0）位置</li>
<li><code>center_refine</code> : 优化<code>friedel_search</code>计算的散射图中心位置</li>
<li><code>inten_profile_vaccurate</code> : 平均强度径向分布</li>
<li><code>inten_profile_vfast</code> : 快速计算平均强度径向分布</li>
<li><code>cal_saxs</code> : 计算数据集的粉末散射</li>
<li><code>centering</code> : 将散射图中心（q=0）移至图像的几何中心</li>
<li><code>particle_size</code> : 通过粉末/SAXS散射数据拟合颗粒直径</li>
<li><code>particle_size_sp</code> : 使用Iq曲线拟合类球状颗粒的直径</li>
</ul>
<h4 id="orientation">orientation</h4>
<ul>
<li><code>Sphere_randp</code> : 产生在球面上随机分布/均匀分布的点的坐标</li>
<li><code>proc_Hammer</code> : 将四元数变换为Aitoff-Hammer投影坐标</li>
<li><code>draw_Hammer</code> : 绘画Aitoff-Hammer坐标图</li>
<li><code>draw_ori_Df</code> : 绘制EMC重建结果的空间取向分布图</li>
</ul>
<h4 id="criterion">criterion</h4>
<ul>
<li><code>r_factor</code> : 计算两模型（强度矩阵）的总体R值</li>
<li><code>r_factor_shell</code> : 计算两模型的R值在q上的分布</li>
<li><code>fsc</code> : 计算两模型（倒易空间）的傅里叶壳层系数</li>
<li><code>r_split</code> : 计算两模型（倒易空间）的R-split值在q上的分布</li>
<li><code>Pearson_cc</code> : 计算两向量强度的皮尔森相关系数</li>
<li><code>PRTF</code> : 计算多次相位恢复的相位恢复转移函数</li>
</ul>
<h4 id="rotate">rotate</h4>
<ul>
<li><code>eul2rotm</code> : 将欧拉角以内旋转方式转换为旋转矩阵</li>
<li><code>rot_ext</code> : 使用欧拉角将三维矩阵进行外旋转</li>
<li><code>align</code> : 通过网格搜索对齐两3D模型（三维矩阵）</li>
</ul>
<h4 id="sh_expan">SH_expan</h4>
<ul>
<li><code>sp_harmonics</code> : 将3D模型进行球谐展开</li>
</ul>
<hr />
<h3 id="image"><a href="../../Documents/image/">image</a></h3>
<blockquote>
<p>散射图像处理与数据读写模块</p>
</blockquote>
<h4 id="radp">radp</h4>
<ul>
<li><code>radial_profile</code> : 计算散射图/散射体的径向强度分布（Iq曲线）</li>
<li><code>shells</code> : 在指定半径处生成二维/三维球壳，返回球壳上像素坐标</li>
<li><code>radp_norm</code> : 依据指定Iq曲线对散射图/散射体的强度进行规范化</li>
<li><code>circle</code> : 根据指定半径生成圆或球体，返回圆内/球内的像素坐标</li>
</ul>
<h4 id="quat">quat</h4>
<ul>
<li><code>invq</code> : 求四元数的逆</li>
<li><code>quat_mul</code> : 两四元数相乘</li>
<li><code>conj</code> : 求四元数的共轭</li>
<li><code>quat2rot</code> : 将四元数转换为旋转矩阵</li>
<li><code>rot2quat</code> : 将旋转矩阵转化为四元数</li>
<li><code>quat2azi</code> : 将四元数转换为方位角</li>
<li><code>azi2quat</code> : 将方位角转换为四元数</li>
<li><code>rotv</code> : 使用四元数旋转三维向量</li>
<li><code>Slerp</code> : 在两四元数间进行线性插值，得到新四元数</li>
</ul>
<h4 id="classify">classify</h4>
<ul>
<li><code>cluster_fSpec</code> : 使用线性/非线性降维和谱聚类识别单颗粒散射图像</li>
<li><code>cluster_fTSNE</code> : 使用t-SNE降维和KNN识别单颗粒散射图像</li>
<li><code>diffusion_map</code> : 扩散映射降维</li>
</ul>
<h4 id="preprocess">preprocess</h4>
<ul>
<li><code>fix_artifact</code> : 在提供坏点位置的条件下修复图像坏点</li>
<li><code>fix_artifact_auto</code> : 自动识别图像坏点并修复</li>
<li><code>adu2photon</code> : 将ADU值转换为光子数</li>
<li><code>hit_find</code> : 命中检测，使用卡方检验法</li>
<li><code>hit_find_pearson</code> : 命中检测，使用皮尔森系数法</li>
<li><code>cal_correction_factor</code> : 计算激光极化和探测器立体角导致的散射强度修正因子</li>
<li><code>avg_pooling</code> : 对散射图像进行降采样</li>
</ul>
<h4 id="io">io</h4>
<ul>
<li><code>readccp4</code> : 读取CCP4/mrc文件</li>
<li><code>writeccp4</code> : 将三维强度矩阵写入CCP4/mrc文件</li>
<li><code>pdb2density</code> : 读取PDB文件并计算其电子密度分布</li>
<li><code>cxi_parser</code> : 抽取CXI文件内部结构</li>
<li><code>xyz2pdb</code> : 将XYZ坐标数据转化为PDB文件</li>
<li><code>readpdb_full</code> : 读取PDB文件并返回其信息</li>
</ul>
<hr />
<h3 id="merge"><a href="../../Documents/merge/">merge</a></h3>
<blockquote>
<p>空间角恢复与三维整合</p>
</blockquote>
<h4 id="emc">emc</h4>
<ul>
<li><code>new_project</code> : 创建新的EMC项目</li>
<li><code>config</code> : 配置项目</li>
<li><code>run</code> : 运行项目</li>
<li><code>use_project</code> : 切换至其他EMC项目</li>
</ul>
<h4 id="tools">tools</h4>
<ul>
<li><code>get_slice</code> : 对三维散射强度模型进行二维切片</li>
<li><code>merge_slice</code> : 将二维散射图像整合为三维强度</li>
<li><code>poisson_likelihood</code> : 计算散射模型切片和散射图像之间的泊松概率</li>
<li><code>maximization</code> : 极大似然计算散射图像新的空间角度分布</li>
<li><code>get_quaternion</code> : 计算在旋转空间均匀分布的四元数集合</li>
</ul>
<hr />
<h3 id="phase"><a href="../../Documents/phase/">phase</a></h3>
<blockquote>
<p>相位恢复</p>
</blockquote>
<h4 id="phmodel">phmodel</h4>
<ul>
<li><code>pInput</code>,<code>pOutput</code>,<code>pMerge</code>,<code>ERA</code>,<code>HIO</code>,<code>DM</code>,<code>RAAR</code>,<code>HPR</code> : 相位恢复网络框架（PRNF）的算法和功能节点实现</li>
</ul>
<h4 id="phexec">phexec</h4>
<ul>
<li><code>Runner</code> : 运行类，用以运行PRNF</li>
</ul>
<h4 id="phase2d">phase2d <em>（停止维护）</em></h4>
<ul>
<li><code>new_project</code> : 创建二维相位恢复项目</li>
<li><code>config_project</code> : 配置项目</li>
<li><code>run_project</code> : 运行项目</li>
<li><code>use_project</code> : 切换至其他项目</li>
</ul>
<h4 id="phase3d">phase3d <em>（停止维护）</em></h4>
<ul>
<li>三维相位恢复项目，函数与phase2d相同</li>
</ul>
<hr />
<h3 id="simulate"><a href="../../Documents/simulate/">simulate</a></h3>
<blockquote>
<p>单颗粒散射模拟</p>
</blockquote>
<h4 id="sim_adu">sim_adu</h4>
<ul>
<li><code>go_magic</code> : 对PDB结构进行散射模拟，可选择原子散射或FFT变换方法</li>
</ul>
                
                  
                
              
              
                


              
            </article>
          </div>
        </div>
      </main>
      
        
<footer class="md-footer">
  
    <div class="md-footer-nav">
      <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
        
          <a href="../installation/" title="安装" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
            <div class="md-footer-nav__button md-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
            </div>
            <div class="md-footer-nav__title">
              <div class="md-ellipsis">
                <span class="md-footer-nav__direction">
                  上一页
                </span>
                安装
              </div>
            </div>
          </a>
        
        
          <a href="../best-practice/" title="使用例子" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
            <div class="md-footer-nav__title">
              <div class="md-ellipsis">
                <span class="md-footer-nav__direction">
                  下一页
                </span>
                使用例子
              </div>
            </div>
            <div class="md-footer-nav__button md-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
            </div>
          </a>
        
      </nav>
    </div>
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-footer-copyright">
        
        Made with
        <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
          Material for MkDocs
        </a>
      </div>
      
    </div>
  </div>
</footer>
      
    </div>
    
      <script src="../../assets/javascripts/vendor.c3dc8c49.min.js"></script>
      <script src="../../assets/javascripts/bundle.f9edbbd5.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "\u590d\u5236", "clipboard.copied": "\u5df2\u590d\u5236", "search.config.lang": "ja", "search.config.pipeline": "trimmer, stemmer", "search.config.separator": "[\\uff0c\\u3002]+", "search.result.placeholder": "\u952e\u5165\u4ee5\u5f00\u59cb\u641c\u7d22", "search.result.none": "\u6ca1\u6709\u627e\u5230\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.one": "\u627e\u5230 1 \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.other": "# \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c"}</script>
      
      <script>
        app = initialize({
          base: "../..",
          features: [],
          search: Object.assign({
            worker: "../../assets/javascripts/worker/search.8e2cddea.min.js"
          }, typeof search !== "undefined" && search)
        })
      </script>
      
    
  </body>
</html>